15. 使用 Query 得出结论
使用 Query 得出结论
在下面的notebook 中,你将使用 Pandas 的 query 函数调查有关此数据的两个问题。以下是回答每个问题的提示:
问题 1:酒精含量越高的葡萄酒获得的评级更高吗?
要回答这个问题,请使用 query 创建两组葡萄酒样本:
- 低酒精(酒精含量低于中值的样本)
- 高酒精(酒精含量高于或等于中值的样本)
然后,找到每组的平均质量评级。
问题 2:更甜的葡萄酒(残糖更多)获得的评级更高吗?
同样,使用中值按残糖将样本分为两组,并找出每组的平均质量评级。
Workspace
This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity , so you may be able to download them there.
Workspace Information:
- Default file path:
- Workspace type: jupyter
- Opened files (when workspace is loaded): n/a